package com.gr.menuw.menu.item;

import org.apache.wicket.markup.html.link.AbstractLink;
import org.apache.wicket.markup.html.link.ExternalLink;

/**
 * 
 * @author Graham Rhodes 30 Dec 2010 16:26:09
 */
public class ExternalLinkMenuItem extends AbstractMenuLink {

    private static final long serialVersionUID = 1L;
    private final String href;
    private final String label;

    /**
     * @param id
     * @param href
     */
    public ExternalLinkMenuItem(String id, String href, String label) {
        super(id, label);
        this.href = href;
        this.label = label;
    }

    @Override
    protected AbstractLink getLink(String id) {
        return new ExternalLink(id, href, label);
    }

    /* (non-Javadoc)
     * @see com.gr.menuw.menu.item.IMenuItem#show(boolean)
     */
    @Override
    public void show(boolean visible) {
        this.setVisible(visible);
    }

}
